package com.example.agrigreennewssys.service;


import com.example.agrigreennewssys.entity.ArticleLike;
import com.example.agrigreennewssys.entity.Comment;
import com.example.agrigreennewssys.entity.CommentLike;

import java.util.List;

public interface CommentService {
    Comment addComment(Comment comment);

    int deleteComment(Long commentId, Long userId);
    // 获取文章的评论(状态为1)
    List<Comment> getCommentsByArticleId(Long articleId, Long currentUserId);
    // 获取所有评论
    List<Comment> getAllComments();

    Comment getCommentById(Long commentId);
    boolean updateCommentStatus(Long commentId, Integer status);

//    boolean likeComment(Long commentId, Long userId);
//
//    boolean unlikeComment(Long commentId, Long userId);


    boolean isCommentLiked(Long commentId, Long userId);
    // 点赞评论
    boolean likeComment(Long commentId, Long userId,Long articleId);

    // 取消点赞
    boolean unlikeComment(Long commentId, Long userId);

    // 获取点赞列表（关联用户、文章信息）
    List<CommentLike> selectCommentLikeList(String nickName, String articleTitle, String content);
}
